export let Global = {
    gameInstance: null,
    //存储用户信息
    user: {uid: 10000, name:"Bee"},
    //存储房间信息
    room: {},
    //存储游戏信息
    state: {},
    currentUserIsDealer() {
        let uid = this.user._id
        let did = this.room.dealerId
        if (uid && did) {
            return uid === did
        }
        return false
    },
    reset() {
        this.user = {}
    }
}
export let GameState = cc.Enum({
    WaitToSit: 'waitToSit',
    WaitToBegin: 'waitToBegin',
    OutBetting: 'outBetting',
    Betting: 'betting',
    Waiting: 'waitToStart',
    Playing: 'playing',
    Beginning: 'beginning',
    PreparedToStart: 'preparedToStart'
})